package com.loukou.lkt.lkt.enums;

public enum GoodsStockLogBusinessTypeEnum {
	TYPE_PURCHASE(0,"采购入库"),
	TYPE_RETURN(1,"退货出库"),
	TYPE_ALLOCATION_IN(2,"调拨入库"),
	TYPE_ALLOCATION_OUT(3,"调拨入库"),
	TYPE_SELL(4,"销售出库");
	
	private int id;
	private String name;
	private GoodsStockLogBusinessTypeEnum(int id, String name) {
		this.id = id;
		this.name = name;
	}
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public static GoodsStockLogBusinessTypeEnum parsePositionTypeEnum(int id) {
		for (GoodsStockLogBusinessTypeEnum typeEnum : GoodsStockLogBusinessTypeEnum.values()) {
			if(typeEnum.id == id){
				return typeEnum;
			}
		}
		return TYPE_PURCHASE;
	}
}
